package com.app.miwawa.api.system.entity.center;

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.framework.common.api.entity.CommonEntityUUID;
import org.framework.common.api.support.annotation.Chosen;
import org.framework.common.api.support.annotation.ChosenType;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 系统管理－门店
 * <p>描述: </p>
 * <p>Company: Professional</p>
 * @author chanlong(陈龙)
 * @date 2016年2月7日 下午12:00:57
 * @version 1.0.2016
 */
@Entity @Table(name = "TB_SYSTEM_SHOPS")
public class Shops extends CommonEntityUUID {

	/** serialVersionUID(long):. */
	private static final long serialVersionUID = 6457995098146299309L;

	// 门店星级
	@Column(name = "star", length = 5, nullable = true)
	private String star;

	// 门店编码
	@Column(name = "code", length = 50, nullable = true)
	private String code;

	// 门店名称
	@Column(name = "name", length = 50, nullable = true)
	private String name;

	// 店长
	@Column(name = "keeper", length = 10, nullable = true)
	private String keeper;

	// 手机
	@Column(name = "mobile", length = 15, nullable = true)
	private String mobile;

	// 邮编
	@Column(name = "zipcode", length = 10, nullable = true)
	private String zipcode;

	// 地址
	@Column(name = "address", length = 100, nullable = true)
	private String address;

	// 电话
	@Column(name = "telephone", length = 15, nullable = true)
	private String telephone;

	// 区域ID
	@Column(name = "region_id", length = 50, nullable = true)
	private String regionid;
	
	// 中心ID
	@Column(name = "center_id", length = 50, nullable = true)
	private String centerid;
	
	// 机构介绍
	@Lob @Basic(fetch=FetchType.LAZY)
	@Column(name = "description", nullable = true)
	private String description;
	
	// 创建时间（创立时间）
	@Temporal(TemporalType.DATE)
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@Column(name = "create_date", nullable = true)
	private Date createDate;

	@Override
	@Chosen(type = ChosenType.VALUE)
	public String getId() {
		return super.getId();
	}

	public String getStar() {
		return star;
	}

	public void setStar(String star) {
		this.star = star;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Chosen(type = ChosenType.TEXT)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getKeeper() {
		return keeper;
	}

	public void setKeeper(String keeper) {
		this.keeper = keeper;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getZipcode() {
		return zipcode;
	}

	public void setZipcode(String zipcode) {
		this.zipcode = zipcode;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public String getRegionid() {
		return regionid;
	}

	public void setRegionid(String regionid) {
		this.regionid = regionid;
	}

	public String getCenterid() {
		return centerid;
	}

	public void setCenterid(String centerid) {
		this.centerid = centerid;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

}
